<?php
if (!isset($_SESSION)) session_start();

$template = "{$_SERVER["DOCUMENT_ROOT"]}/modules/templates/{$config["template"]}/menu/";
if (! is_dir($template)) $template = "{$_SERVER["DOCUMENT_ROOT"]}/modules/menu/";
//echo $template;


if ((isset($_SESSION["username"]))&&(file_exists("{$template}pending_menu.txt"))) {
	$menu_file = "{$template}pending_menu.txt";
	$nav_file = "{$template}pending_navbar.txt";
} else {
	$menu_file = "{$template}menu.txt ";
	$nav_file = "{$template}navbar.txt";
}

//echo $menu_file;

//$str =file_get_contents("{$menu_file}");
//$menu = json_decode($str);

//$menu = unserialize (file_get_contents("{$menu_file}"));
//$navbar = unserialize (file_get_contents("{$nav_file}"));

include "{$_SERVER["DOCUMENT_ROOT"]}/modules/menu/menu_json.php";
include "{$_SERVER["DOCUMENT_ROOT"]}/modules/menu/navbar_json.php";

//print_r($menu);


?>